<template>
  <ul class="news-list">
    <li>编号：{{ id }}</li>
    <li>标题：{{ title }}</li>
    <li>内容：{{ content }}</li>
  </ul>
</template>

<script setup lang="ts" name="About">
// import { toRefs } from "vue";
import { useRoute } from "vue-router";

const route = useRoute();
// 这里解构的时候，丢失了响应式，所以你需要添加回去用toRefs
// const { query } = toRefs(route);
// const { params } = toRefs(route);

// 因为你在路由规则中设置了props，数据以属性的形式传递过来
defineProps(["id", "title", "content"]);
</script>

<style scoped>
.news-list {
  list-style: none;
  padding-left: 20px;
}

.news-list > li {
  line-height: 30px;
}
</style>
